package work.MrSun.xyq.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import work.MrSun.xyq.model.XyqSwiper;
import work.MrSun.xyq.service.XyqSwiperService;

import java.util.List;

/**
 * 获取所有的轮播图
 */
@RestController
public class GetSwiperMessageController {

    @Autowired
    private XyqSwiperService xyqSwiperService;

    @PostMapping("/getMessage/getAllSwiperMessage")
    public List<XyqSwiper> getAllSwiperMessage() {
        return xyqSwiperService.findAll();
    }
}
